Thumb

Select Statement Inside the Stored procedure

9/14/2020 7:11:25 AM

Select Statement Inside the Stored procedure: we can see the select statement in SQL query, now we create a stored procedure for get the recode from the table. Given bellow the code:

CREATE PROCEDURE GetData
AS
BEGIN
SET NOCOUNT ON
SELECT *  FROM Salary
END
EXEC [dbo].[GetData]

In this code we create procedure name as GetData then under the syntax we create a select query then using by EXEC keyword for execute the stored procedure.